// 二进制流导出excel
export function exportExcel (data, name) {
  const blob = new Blob([data], {type: 'application/vnd.ms-excel'})
  const link = document.createElement('a')
  link.href = URL.createObjectURL(blob)
  link.download = `${name}.xlsx`
  document.body.appendChild(link)
  link.click()
  window.setTimeout(function () {
    URL.revokeObjectURL(blob)
    document.body.removeChild(link)
  }, 0)
}
